﻿@model MobileSales.Model.Employees.Employee

@{
    View.Title = Strings.Employees + " - " + Strings.Details;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@Strings.Employees &nbsp;&raquo;&nbsp; @Strings.Details</h2>

<fieldset>
    <legend>@Strings.Fields</legend>

    <div class="display-label">@ModelStrings.Email</div>
    <div class="display-field">@Model.Email</div>

    @if (Model.SupervisorId.HasValue) 
    {
    <div class="display-label">@ModelStrings.Supervisor</div>
    <div class="display-field">@Html.EmployeeIdentity(Model.SupervisorId.Value)</div>
    }

    <div class="display-label">@ModelStrings.Firstname</div>
    <div class="display-field">@Model.Firstname</div>

    <div class="display-label">@ModelStrings.Lastname</div>
    <div class="display-field">@Model.Lastname</div>

    <div class="display-label">@ModelStrings.Password</div>
    <div class="display-field">@Model.Password</div>

    <div class="display-label">@ModelStrings.Zipcode</div>
    <div class="display-field">@Model.Zipcode</div>

    <div class="display-label">@ModelStrings.City</div>
    <div class="display-field">@Model.City</div>

    <div class="display-label">@ModelStrings.Street</div>
    <div class="display-field">@Model.Street</div>

    <div class="display-label">@ModelStrings.Phone</div>
    <div class="display-field">@Model.Phone</div>

    <div class="display-label">@ModelStrings.LocationLongitude</div>
    <div class="display-field">@String.Format("{0:F}", Model.LocationLongitude)</div>

    <div class="display-label">@ModelStrings.LocationLatitude</div>
    <div class="display-field">@String.Format("{0:F}", Model.LocationLatitude)</div>

    <div class="display-label">@ModelStrings.LocationTimestamp</div>
    <div class="display-field">@String.Format("{0:g}", Model.LocationTimestamp)</div>

    <div class="display-label">@ModelStrings.Login</div>
    <div class="display-field">@Model.Login</div>

    <div class="display-label">@ModelStrings.Language</div>
    <div class="display-field">@Model.Language</div>

    <div class="display-label">@ModelStrings.IsApproved</div>
    <div class="display-field">@(Model.IsApproved ? Strings.Yes : Strings.No)</div>

    <div class="display-label">@ModelStrings.Role</div>
    <div class="display-field">@Model.Role.Name</div>

    <div class="display-label">@ModelStrings.Contract</div>
    <div class="display-field">@Model.Contract.Name</div>

    @Html.ParamsFor(MobileSales.Model.Params.ParamType.Employee, Model.Params)
</fieldset>
<p>
    @Html.ActionLink(Strings.Edit, "Edit", new { id = Model.Id }, new { @class = "icon-button edit-icon" }) |
   @Html.ActionLink(Strings.BackToList, "Index", null, new { @class="icon-button prev-icon" })
</p>
